home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
vbmdixpl
/
floating.frm
< prev
next >
Wrap
Text File
|
1995-05-02
|
4KB
|
152 lines
VERSION 2.00
Begin Form FloatingToolbar
BorderStyle = 1 'Fixed Single
ClientHeight = 1965
ClientLeft = 6945
ClientTop = 5145
ClientWidth = 945
Height = 2370
Left = 6885
LinkTopic = "Form2"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 1965
ScaleWidth = 945
Top = 4800
Width = 1065
Begin PictureBox SampleIcon
DragMode = 1 'Automatic
Height = 492
Index = 7
Left = 480
Picture = FLOATING.FRX:0000
ScaleHeight = 465
ScaleWidth = 465
TabIndex = 7
Top = 1440
Width = 492
End
Begin PictureBox SampleIcon
DragMode = 1 'Automatic
Height = 492
Index = 6
Left = 0
Picture = FLOATING.FRX:0302
ScaleHeight = 465
ScaleWidth = 465
TabIndex = 6
Top = 1440
Width = 492
End
Begin PictureBox SampleIcon
DragMode = 1 'Automatic
Height = 492
Index = 5
Left = 480
Picture = FLOATING.FRX:0604
ScaleHeight = 465
ScaleWidth = 465
TabIndex = 5
Top = 960
Width = 492
End
Begin PictureBox SampleIcon
DragMode = 1 'Automatic
Height = 492
Index = 4
Left = 0
Picture = FLOATING.FRX:0906
ScaleHeight = 465
ScaleWidth = 465
TabIndex = 4
Top = 960
Width = 492
End
Begin PictureBox SampleIcon
DragMode = 1 'Automatic
Height = 492
Index = 3
Left = 480
Picture = FLOATING.FRX:0C08
ScaleHeight = 465
ScaleWidth = 465
TabIndex = 3
Top = 480
Width = 492
End
Begin PictureBox SampleIcon
DragMode = 1 'Automatic
Height = 492
Index = 0
Left = 0
Picture = FLOATING.FRX:0F0A
ScaleHeight = 465
ScaleWidth = 465
TabIndex = 2
Top = 0
Width = 492
End
Begin PictureBox SampleIcon
DragMode = 1 'Automatic
Height = 492
Index = 2
Left = 0
Picture = FLOATING.FRX:120C
ScaleHeight = 465
ScaleWidth = 465
TabIndex = 1
Top = 480
Width = 492
End
Begin PictureBox SampleIcon
DragMode = 1 'Automatic
Height = 492
Index = 1
Left = 480
Picture = FLOATING.FRX:150E
ScaleHeight = 465
ScaleWidth = 465
TabIndex = 0
Top = 0
Width = 492
End
End
Declare Function SetWindowPos Lib "user" (ByVal h%, ByVal hb%, ByVal x%, ByVal y%, ByVal cx%, ByVal cy%, ByVal f%) As Integer
Sub Form_Load ()
Const SWP_NOMOVE = 2
Const SWP_NOSIZE = 1
Const FLAGS = SWP_NOMOVE Or SWP_NOSIZE
Const HWND_TOPMOST = -1
Const HWND_NOTOPMOST = -2
' To set the form XXXX to TOPMOST, use the following code:
success% = SetWindowPos(Me.hWnd, HWND_TOPMOST, 0, 0, 0, 0, FLAGS)
'success% <> 0 When Successful
' size the Toolbar:
FloatingToolbar.Width = SampleIcon(1).Width * 2
FloatingToolbar.Height = SampleIcon(1).Height * 4 + 300 'empiric for the Titlebar
' load the Drag Icons
For i = 0 To 7
SampleIcon(i).DragIcon = SampleIcon(i).Picture
Next
End Sub
Sub Form_QueryUnload (cancel As Integer, UnloadMode As Integer)
' Fake an unload
cancel = 1 ' dont unload
Me.Visible = False ' but become invisble
' reset the Menu-Option
MDIForm1.M_FloatingToolbar.Checked = False
End Sub